package com.bestcem.xm.qdes.mapper;

import com.bestcem.xm.component.mybatis.mapper.XmCommonMapper;
import com.bestcem.xm.qdes.controller.vo.OperableProjectVo;
import com.bestcem.xm.qdes.controller.vo.ProjectEntryVo;
import com.bestcem.xm.qdes.entity.QdesProject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface QdesProjectMapper extends XmCommonMapper<QdesProject> {

    int getMaxCodeNum(@Param(value = "length") int length, @Param(value = "orgId") String orgId);

    List<OperableProjectVo> getOperableProjectList(Integer permission, String userId);

    Long countOperableProjectList(String userId, @Param(value = "permission") Integer permission, @Param(value = "title") String title, @Param(value = "status") Integer status);

    List<ProjectEntryVo> pageOperableProjectList(String userId, @Param(value = "permission") Integer permission, @Param(value = "offset") Integer offset, @Param(value = "limit") Integer limit, @Param(value = "title") String title, @Param(value = "status") Integer status);
}